//
//  TimerView.m
//  ShopDemo
//
//  Created by 飞扬的青春 on 2018/8/13.
//  Copyright © 2018年 飞扬的青春. All rights reserved.
//

#import "TimerView.h"

@implementation TimerView

-(instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self) {
        for (int i = 0; i < 5; i ++) {
            UILabel *lab = [UILabel new];
            lab.font = [UIFont systemFontOfSize:13*kJLXWidthScale];
            lab.textAlignment = NSTextAlignmentCenter;
            lab.textColor = [UIColor whiteColor];
            [self addSubview:lab];
            lab.sd_layout
            .centerYEqualToView(self)
            .leftSpaceToView(self, 20*i)
            .heightIs(25*kJLXWidthScale)
            .widthIs(20*kJLXWidthScale);
            if (i == 1 || i == 3) {
                lab.backgroundColor = [UIColor whiteColor];
                lab.textColor = [UIColor blackColor];
                lab.text = @":";
            }else{
                if (i == 0) {
                    self.hourlab = lab;
                }else if (i == 2){
                    self.minlab = lab;
                }else if (i == 4){
                    self.sslab = lab;
                }
                lab.backgroundColor = [UIColor blackColor];
            }
        }
        
        
    }
    return self;
}



/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
